<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo Yii::$app->name;?> 后台管理</title>
<?php $this->HeaderView(['datetimepicker']);?>

<script>
function view(postid){
    var url = '<?php echo \Yii::$app->urlManager->createUrl('view')?>?postid='+postid;	
	art.dialog.open(url,{
		id:'view',
		width:480,
		lock:true,
		fixed:true,
		title:'帖子详情'
	});
}
function slideorder(){
    var url = '<?php echo \Yii::$app->urlManager->createUrl('SlideOrder');?>';	
	art.dialog.open(url,{
		id:'view',
		width:480,
		lock:true,
		fixed:true,
		title:'轮播图排序'
	});
}

</script>



<style >
  .view-index-list td{
    /*text-align: center;*/
  }
  .view-index-list .ta a {
    color: red;
    display: block;
    font-weight: bold;
    -webkit-transition: all ease .3s;  
    transition: all ease .3s;

  }

.view-index-list .ta a:hover{
     -webkit-transform: scale(1.1);  
       transform: scale(1.1);  
       box-shadow: 0px 0px 25px rgba(0,0,0,.5); 
    }

</style>

</head>
<body class="view_index" id="view_index_Article">
<div class="view-index-nav">
        <h3>帖子管理</h3>
  <p class="tips">
        <strong style="color:#F00">屏蔽</strong>的帖子在前台只有版主可见。
        </p>
</div>

<?php

?>
<div class="padding-0-20">
<table class="view-index-search mb-10" border="0" cellspacing="0" cellpadding="0" width="100%">
<form class="view-index-form" method="" action="<?php echo base\YiiMobo::createUrl('post/index');?>" enctype="multipart/form-data">
<?php echo base\YiiMobo::csrfToken();?>
         
         <input type="hidden" class="input-text" id="show" name="show" value="<?php echo @$search['show'];?>">
        <tr>
        <td class="search">
        <div class="div-search" style="margin:0px 0px">
   
       关键字：<input class="input-text" value="<?php echo @$search['keyword'];?>" name="keyword" id="ts" style="width:200px;"/><img align="absmiddle" id="delkey" onclick="return $('#ts').val('')" style="margin-left:-30px; cursor: pointer;" src="<?php echo  Yii::$app->request->baseUrl; ?>/static/common/images/clear.png"/>

        <span class="view-index-batch">
        <div class="ftr">
        <span class="" style="line-height:35px; margin-right:10px;">共 <?php echo @$count?> 帖子</span>
        </div>

        <input id="submit_search" class="btn-button confirmSubmit" type="submit" value="搜索" name="submit_search" style="margin-left:10px"/>
        </span></div>
         
        </td>
        </tr>
</form>
</table>
</div>

    
    
    
    
    
    
    
    
    
    
    
    

<form class="view-index-form mt-10" method="post" action="<?php echo \Yii::$app->urlManager->createUrl('batch');?>" enctype="multipart/form-data">
<table class="view-index-list" border="0" cellspacing="0" cellpadding="0" width="100%">
    <thead>
        <tr>
                        
                        <th align="center" width="30">序号</th>
                        <th align="center" >帖子内容</th>
                        <th align="center" width="80px">发布人</th>
                        <th align="center" width="110">发布时间</th>
                        <th align="center" width="40">评论</th>
                        <th align="center" width="10" >屏蔽</th>
                        <th class="norightborder" width="50">操作</th>
        </tr>
    </thead>
    <tbody>
   <?php  
        
    foreach($models as $k=>$v){
       
    ?>
    <tr>

         <td align="center"></td> 
         <td align="left"><?php echo htmlspecialchars($v['content']);?></td>
         <td align="center"><?php echo $v['username'];?></td>
         <td align="center"><?php echo date('Y-m-d H:i',$v['datetime']);?></td> 
         <td align="center" class="ta"><a href="<?php echo \Yii::$app->urlManager->createUrl('post/replay',array('postid'=>$v['postid'], 'subject'=>$v['subject']));?>" ><?php echo $v['comments'];?></a></td>      
         <td  align="center" class="td-locked" ><div  onclick="change_switch(this, '<?php echo \Yii::$app->urlManager->createUrl('invisible', array('postid'=>$v['postid']));?>');" id="btn-locked" class="locked-<?php echo intval($v['invisible']);?>"></div></td> 
         <td align="center" class="td-operation">
             <!-- <a href="<?php echo \Yii::$app->urlManager->createUrl(['update','postid'=>$v['postid'], 'forumid'=>$v['forumid']])?>" class="operation-update">编辑</a> -->
             <a href="<?php echo \Yii::$app->urlManager->createUrl(['delete','postid'=>$v['postid'], 'forumid'=>$v['forumid']])?>" title="确定要删除吗？<br><br>会同时删除该帖子的回复及关注。" class="operation-delete">删除</a>
          </td>
    </tr>
      
  <?php }?>        
        
        
        </tbody>
    
</table>


<?= base\YiiMobo::csrfToken();?>
</form>
<div class="pages">
<?php

echo yii\widgets\LinkPager::widget(['pagination' => $pages]);
    ?>
</div>
<script>
$(function(){
  //添加位置导航文字 请修改
	admin_location('用户交流管理 > 论坛管理');
})
</script>
<?php $this->FooterView();?>
</body>
</html>